import request from "@/utils/request"
// 跟卖asin列表
export const list = (data) =>
  request({
    url: "/v1/base/follow-sale/list",
    method: "post",
    data,
  })
// 修改状态
export const updateStatus = (data) =>
  request({
    url: "/v1/base/follow-sale/update-status",
    method: "post",
    data,
  })

// 日志
export const followLog = (data) =>
  request({
    // url: `/v1/base/follow-sale/log?id=${data.id}`,
    // method: "post",
    url: "/v1/base/follow-sale/log",
    method: "post",
    data,
  })

// 创建跟卖记录
export const followCreate = (data) =>
  request({
    url: "/v1/base/follow-sale/create",
    method: "post",
    data,
  })
// 修改跟卖记录
export const followEdit = (data) =>
  request({
    url: "/v1/base/follow-sale/edit",
    method: "post",
    data,
  })

// 跟卖详情
export const followDetail = (data) =>
  request({
    url: "/v1/base/follow-sale/detail",
    method: "post",
    data,
  })
// 下载导入模板
export function downloadImportTpl(data) {
  return request({
    url: `/v1/base/follow-sale/download-import-tpl`,
    method: "post",
    data,
    responseType: "arraybuffer",
  })
}
// 跟卖导入
export const followSaleImport = (data) =>
  request({
    url: "/v1/base/follow-sale/import",
    method: "post",
    data,
    responseType: "arraybuffer",
  })
